const express = require("express");
const router = express.Router();
const {
  list,
  details,
  add,
  del,
  update,
} = require("../../controllers/learn/chaptersController");
/**
 * 查询所有章节信息
 * GTE  /chapters/list
 */
router.get("/list", list);

/**
 * 查询章节详情
 * GET /chapters/details
 */
router.get("details", details);

/**
 * 新增章节
 * POST /chapters/add
 */
router.post("/add", add);

/**
 * 删除章节
 * DELETE /chapters/delete
 */
router.delete("/delete", del);

/**
 * 更新章节
 * PUT /chapters/update
 */
router.put("/update", update);

module.exports = router;
